home *** CD-ROM | disk | FTP | other *** search
- /* datastruct.c
- /* written by : Jason R. Wilson */
- /* these routines perform initialization on data */
- /* structures found in datastruct.h */
- /* specifically, sets all pointers initially to NULL */
-
- #include "datastruct.h"
- #include <stdio.h>
- void InitVertexListCell (VertexListCell *VertList)
- {
- VertList->Vertex = NULL;
- VertList->Rest = NULL;
- }
-
- void InitPolygonListCell (PolygonListCell *PolyList)
- {
- PolyList->Polygon = NULL;
- PolyList->Rest = NULL;
- }
-
- void InitVisVertexCell (VisVertexCell *VisVert)
- {
- VisVert->Next = NULL;
- VisVert->B.r = 0.0;
- VisVert->B.g = 0.0;
- VisVert->B.b = 0.0;
- }
-
- void InitPolygonCell (PolygonCell *Poly)
- {
- Poly->Vertices = NULL;
- Poly->VisVertices = NULL;
- Poly->Next = NULL;
- Poly->Culled = false;
- Poly->Textured = false;
- Poly->Subs[0] = NULL;
- Poly->Subs[1] = NULL;
- Poly->Subs[2] = NULL;
- Poly->Subs[3] = NULL;
- }
-
- void InitVertexCell (VertexCell *Vert)
- {
- Vert->Polygons = NULL;
- Vert->Next = NULL;
- Vert->Number = 0;
- }
-
- void InitObjectCell (ObjectCell *Object)
- {
- Object->VertexHead = NULL;
- Object->PolygonHead = NULL;
- Object->Next = NULL;
- }
-
-
-
-
-